package com.lei.zktwo.mvp.model;

import com.lei.mvptwozk.retrofit.NetWorkManger;
import com.lei.zktwo.mvp.Api;
import com.lei.zktwo.mvp.contract.LoginContract;

import java.util.HashMap;

import io.reactivex.Observable;

public class LoginModel implements LoginContract.Model {
    @Override
    public Observable appkey(HashMap<String, String> map) {
        Api creater = NetWorkManger.getInstance().creater(Api.class);
        return creater.appkey(map);
    }

    @Override
    public Observable login(HashMap<String, String> map) {
        Api creater = NetWorkManger.getInstance().creater(Api.class);
        return creater.login(map);
    }

    @Override
    public Observable register(HashMap<String, String> map) {
        Api creater = NetWorkManger.getInstance().creater(Api.class);
        return creater.register(map);
    }

    @Override
    public void destroy() {

    }
}
